package org.gd.hellojson.jackson.formatter;

import org.codehaus.jackson.JsonNode;
import org.codehaus.jackson.map.ObjectMapper;

import java.io.InputStream;
import java.util.Map;

/**
 * @author Gorhover
 * @version 1.0-SNAPSHOT
 * @since 2013-11-20 15:42
 */
public class Test {

    public static void main(String[] args) throws Exception {
        ObjectMapper mapper = new ObjectMapper();
        InputStream inputStream = App.json().openStream();

        JsonNode jsonNode = mapper.readTree(inputStream);
        jsonNode = jsonNode.get("Task");
        Task map = mapper.readValue(jsonNode, Task.class);
//        System.out.println(map.get("controlFIO"));
        System.out.println(map.getControlFio());
    }
}
